package com.shf.mapper;

import com.shf.entity.Member;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 *会员持久层接口
 * @author 叶枫
 */

public interface MemberMapper {

    /**
     * 显示所有会员
     * @return
     */
    @Select("select  * from member")
    List<Member> showMembers();

    /***
     * 添加订单中间表
     * @param orderId
     * @param travellerIds
     */
    @Insert("insert into order_traveller values (#{orderId},#{travellerIds})")
    void addMmm(@Param("orderId") String orderId,@Param("travellerIds") String travellerIds);

    /**
     * 根据id查询会员
     * @param id
     * @return
     */
    @Select("select * from member where id = #{id}")
    Member selectMemberById(String id);
}
